<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>vue-全局组件</title>
  <script src="bower_components/vue/dist/vue.js" charset="utf-8"></script>
</head>
<body>
  <div id="box">
    <Aaa></Aaa>
  </div>
  <script>
    var Aaa = Vue.extend({
      template:'<h2>我是一个小小的组件</h2>'
    })
    // var a = new Aaa()
    // console.log(a);
    Vue.component('aaa',Aaa)
    var vm = new Vue({
      el: "#box",
      data: {

      }
    })
  </script>
</body>
</html>
